//logs.js

Page({
  data: {
    logs: [] as string[]
  },
  onLoad() {
    this.setData!({
    })
    // 获取位置
    wx.getLocation({
      type:'wgs84',
      success:(result)=>{
        const latitude = result.latitude;
        const longitude = result.longitude;
        const speed = result.speed;
        const accuracy = result.accuracy;
        console.log("latitude:"+latitude+",longitude:"+longitude+",speed:"+speed+",accuracy:"+accuracy);
      },
      complete:(result)=>{
        console.log(result.errMsg);
      },
      fail:(result)=>{
        console.log(result.errMsg);
      },
    })
  },
})
